using MicroMsg.Manager;
using MicroMsg.Plugin.Circle;
using MicroMsg.Resource.@string;
using MicroMsg.UI.Page;
using MicroMsg.UI.Util;
using System;
using System.Diagnostics;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
namespace MicroMsg.UI.UserContrl
{
	public class CirclePluginSetCtrl : PluginSettingBaseCtrl
	{
		internal Grid LayoutRoot;
		internal Button btnStartCircle;
		internal Button btnClearCircle;
		internal Button btnSeeOutGroup;
		private bool _contentLoaded;
		public CirclePluginSetCtrl()
		{
			this.InitializeComponent();
		}
		private void btnStartCircle_Click(object sender, RoutedEventArgs e)
		{
			Circle.getInstance().execute(4, null);
		}
		private void btnClearCircle_Click(object sender, RoutedEventArgs e)
		{
			MMMessageBox mMMessageBox = MMMessageBox.Show(strings.Plugin_ClearPluginMessage, null, true, strings.COM_Confirm, strings.COM_Cancel);
			mMMessageBox.ReturnEvent = new DlgReturnEvent(this.OnClearMsgHandler);
		}
		private void OnClearMsgHandler(DlgReturnEventArg dlgReturnEventArg_0)
		{
			if (MMMessageBox.GetUserClickResult(dlgReturnEventArg_0) != 0)
			{
				return;
			}
			ProcessingCover.getProgressBar(null, strings.Plugin_ClearPluginMessage, null, false, false, null);
			base.get_Dispatcher().BeginInvoke(delegate
			{
				Thread.Sleep(200);
				SnsRecycleMgr.ClearAll();
				ProcessingCover.releaseProgressBar(null);
			});
		}
		private void btnSeeOutGroup_Click(object sender, RoutedEventArgs e)
		{
			SnsSetOutGroupPage.GotoThisPage();
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/Plugin/Sns/Circle/UI/CirclePluginSetCtrl.xaml", 2));
			this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
			this.btnStartCircle = (Button)base.FindName("btnStartCircle");
			this.btnClearCircle = (Button)base.FindName("btnClearCircle");
			this.btnSeeOutGroup = (Button)base.FindName("btnSeeOutGroup");
		}
	}
}
